#include <iostream>
using namespace std;

class Base1 {
public:
    int a;
    Base1() {
        a = 10;
    }
};
class Base2 {
public:
    int b;
    Base2() {
        b = 20;
    }
};
class Base3{
public:
    int a;
    Base3() {
        a = 20;
    }
};
class Son : public Base1, public Base2 {
public:
    int c;
    int d;
    Son() {
        c = 30;
        d = 40;
    }
};

class Son2 : public Base1 , public Base3 {
public:
    int c;
    int d;
    Son2() {
        c = 30;
        d = 40;
    }
};
int main() {
    Son s;
    cout << sizeof(s) << endl;
    cout << s.a << endl;
    cout << s.b << endl;
    cout << s.c << endl;
    cout << s.d << endl;
    Son2 s2;
    cout << sizeof(s2) << endl;
    //cout << s2.a << endl;
    cout << s2.c << endl;
    cout << s2.d << endl;
    cout << s2.Base1::a << endl;
    cout << s2.Base3::a << endl;
    return 0;
}